/*
 * 2.4.cpp
 *
 *  Created on: 2012-5-17
 *      Author: jawinton
 */


#include <iostream>
#include <cstdio>

using namespace std;

#define SIZE 11
#define LEN 101

int main (void) {
	int characters[26];
	for (int i=0; i < 26; i++) characters[i] = 0;

	int n, m, p;
	cin >> n >> m >> p;
	for (int i=0; i<n; i++) {// How to allocate space dalymicly  to two dimentional array
		char arr[SIZE];
		cin >> arr;
		for (int j=0; arr[j]!='\0'; j++) {
			characters[arr[j]-'A']++;
		}
	}
	for (int i=0; i<p; i++) {
		char parr[LEN];
		cin >> parr;
		for (int j=0; parr[j]!='\0'; j++) {
			characters[parr[j]-'A']--;
		}
	}
	for (int i=0; i<26; i++) {
		if(characters[i]) {
			for (int j=0; j<characters[i]; j++)
			printf("%c", i+'A');
		}
	}
	cout << endl;
	return 0;
}
